package com.first.server.controller.admin;

import com.first.common.result.PageResult;
import com.first.common.result.Result;
import com.first.pojo.dto.UserDTO;
import com.first.pojo.dto.UserPlacePageQueryDTO;
import com.first.server.service.UserPlaceService;
import com.first.server.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "基地成员管理接口")
@RequestMapping("admin/userplace")
public class UserPlaceController {
    @Autowired
    private UserService userService;
    @Autowired
    private UserPlaceService userPlaceService;


    /**
     * 将成员加入基地
     * @param userIds 成员id列表
     * @return
     */
    @PutMapping("/place")
    @ApiOperation("加入基地")
    public Result putUserPlace(@RequestParam List<Integer> userIds){
        log.info("成员{}加入基地",userIds);
        userPlaceService.putUserPlace(userIds);
        return Result.success();
    }

}
